import { defineStore } from 'pinia'
import { ref } from 'vue'

// 头部仓库信息
export const headerStore = defineStore('header', () => {
  // 菜单折叠
  const tabbarShow = ref(false)
  // 刷新状态
  const refresh = ref(true)

  // 切换菜单折叠
  const changeTabbar = () => {
    tabbarShow.value = !tabbarShow.value
  }

  // 刷新内容组件
  const changeRefresh = () => {
    refresh.value = !refresh.value
  }

  return {
    tabbarShow,
    changeTabbar,
    refresh,
    changeRefresh
  }
})